<!--
<template>
  &lt;!&ndash; 添加或修改销售信息管理对话框 &ndash;&gt;
  <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :close-on-click-modal="false" v-dialogDrag>
    <el-form ref="form" :model="form" :rules="rules" label-width="150px">
      <el-tabs v-model="activeName" class="detail-tab" type="card">
        <el-tab-pane label="基本信息" name="first">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="客户名称(开票名称)" prop="name">
                <el-input style="width: 80%" v-model="form.name" placeholder="请选择客户名称(开票名称)"/>
                <span style="margin-left: 16px;">
                   <el-button size="mini" type="text" icon="el-icon-edit"
                              @click="choseCustomer()">请选择客户
                   </el-button>
                </span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="税号" prop="taxNo">
                <el-input v-model="form.taxNo" placeholder="请输入税号"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="地址" prop="addr">
                <el-input v-model="form.addr" placeholder="请输入地址"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="电话" prop="tel">
                <el-input v-model="form.tel" placeholder="请输入电话"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="开户行" prop="bankName">
                <el-input v-model="form.bankName" placeholder="请输入开户行"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="账号" prop="bankNo">
                <el-input v-model="form.bankNo" placeholder="请输入账号"/>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="备注信息" prop="info">
                <el-input v-model="form.info" type="textarea" placeholder="请输入备注信息"/>
              </el-form-item>
            </el-col>
          </el-row>
        </el-tab-pane>
      </el-tabs>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>

  </el-dialog>
</template>

<script>
import { addAction, getAction, getById,deleteAction, updateAction } from '@/api/manage'

    export default {
        name: "GoodsCustomerChose",
        dicts: ['goods_supplier', 'goods_customer'],
        data() {
            return {
                // 遮罩层
                loading: true,
                activeName: "first",
                // 弹出层标题
                title: "",
                // 是否显示弹出层
                open: false,
                // 表单参数
                form: {},
                dataList: [],
                total: 0,
                ids:"",
                // 表单校验
                rules: {},
                queryParams: {
                  pageNum: 1,
                  pageSize: 20,
                  id: null,
                  name: null,
                  taxNo: null,
                  addr: null,
                  tel: null,
                  bankName: null,
                  bankNo: null,
                  info: null,
                  status: "0",
                  delFlag: null,
                  createBy: null,
                  createTime: null,
                  updateBy: null,
                  updateTime: null,
                  remark: null
                },
                url: {
                    listBatch: '/goodsOrderIn/goodsOrderIn/listBatch/',
                    getById: '/goodsSale/goodsSale/',
                    add: '/goodsSale/goodsSale/add',
                    edit: '/goodsSale/goodsSale/edit',
                },
                orderInfo:{},
            };
        },
        created() {

        },
        methods: {
            show(){
              this.open=true;
            },
            getList() {
              this.loading = true;
              getById(this.url.listBatch, this.ids).then(response => {
                this.dataList = response.rows;
                this.total = response.total;
                this.loading = false;
              });
            },
            // 取消按钮
            cancel() {
                this.open = false;
                this.reset();
            },
            // 表单重置
            reset() {
                this.form = {
                    id: null,
                    goodsId: null,
                    goodsName: null,
                    goodsBrand: null,
                    goodsUnitPrice: null,
                    goodsCount: null,
                    goodsTotalPrice: null,
                    saleDate: null,
                    supplierId: null,
                    supplierName: null,
                    customerId: null,
                    customerName: null,
                    invoice: "0",
                    invoiceId: null,
                    invoiceNo: null,
                    fundCallback: "0",
                    receipt: null,
                    saleId: null,
                    saleName: null,
                    delFlag: null,
                    createBy: null,
                    createTime: null,
                    updateBy: null,
                    updateTime: null,
                    remark: null
                };
                this.resetForm("form");
            },
            /** 提交按钮 */
            submitForm() {
                this.$refs["form"].validate(valid => {
                    if (valid) {
                        if (this.form.id != null) {
                            updateAction(this.url.edit, this.form).then(response => {
                                this.$modal.msgSuccess("修改成功");
                                this.open = false;
                                this.$emit('ok');
                            });
                        } else {
                            addAction(this.url.add, this.form).then(response => {
                                this.$modal.msgSuccess("新增成功");
                                this.open = false;
                                this.$emit('ok');
                            });
                        }
                    }
                });
            },
        }
    };
</script>
-->
